package com.hwl.commonutils.exception;

import com.hwl.commonutils.result.ResultCodeEnum;
import lombok.Data;
import lombok.EqualsAndHashCode;

@Data
@EqualsAndHashCode(callSuper = true)
public class GuliException extends RuntimeException {

    private Integer code;

    public GuliException(String msg, Integer code) {
        super(msg);
        this.code = code;
    }

    public GuliException(ResultCodeEnum resultCodeEnum) {
        super(resultCodeEnum.getMessage());
        this.code = resultCodeEnum.getCode();
    }
}
